# -*- coding: utf-8 -*-
# @Time    : 2018/7/22 10:36
# @Author  : Tianchiyue
# @File    : runserver.py.py
# @Software: PyCharm Community Edition


import connexion

from swagger_server import encoder
import sys
sys.path.append('./src')
app = connexion.App(__name__, specification_dir='./swagger_server/swagger/')
app.app.json_encoder = encoder.JSONEncoder
app.add_api('swagger.yaml', arguments={'title': '情感分析'})
application = app.app


if __name__ == '__main__':
    app.run(port=7700, server='tornado', debug=True, host='0.0.0.0')
